Skip to content

[App Service] az webapp deploy, az webapp up : Add enriched deployment failure logs for quicker resolution#32940

Open
Shi1810 wants to merge 13 commits intoAzure:devfrom
Shi1810:user/shikhajha/errorcontext
Open

[App Service] az webapp deploy, az webapp up : Add enriched deployment failure logs for quicker resolution#32940
Shi1810 wants to merge 13 commits intoAzure:devfrom
Shi1810:user/shikhajha/errorcontext

Conversation

@Shi1810
Copy link
Copy Markdown
Contributor

@Shi1810 Shi1810 commented Mar 9, 2026

Related command
az webapp deploy
az webapp up
az webapp deployment source config-zip

Description
Currently, only raw error messages are logged in the event of deployment failures.

With this update, customers will have access to the --enriched-error feature flag, allowing them to view detailed failure logs and resolve errors more efficiently.

This feature flag will be available for the az webapp deploy and az webapp up deployment commands.

Testing Guide
az webapp deploy --name wa-bench-b1-10mb-20260316-1513 --resource-group rg-deploy-bench-centralus --src-path test_bad.war --type war --enriched-errors true
image

az webapp deploy --name wa-bench-b1-10mb-20260316-1513 --resource-group rg-deploy-bench-centralus --src-path test_bad.war --type war

image

az webapp up --name wa-bench-b1-10mb-20260316-1513 --resource-group rg-deploy-bench-centralus --enriched-errors true

image

History Notes
[App Service] az webapp up: Add --enriched-errors parameter to see detailed deployment failure log.
[App Service] az webapp deploy: Add --enriched-errors parameter to see detailed deployment failure log.


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings March 9, 2026 09:46
@Shi1810 Shi1810 requested review from jsntcy and yanzhudd as code owners March 9, 2026 09:46
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 9, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 9, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd webapp deploy cmd webapp deploy added parameter enriched_errors
⚠️ 1006 - ParaAdd webapp up cmd webapp up added parameter enriched_errors

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Mar 9, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 9, 2026

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a context-enriched deployment error experience for App Service webapp deployments so failures produce a structured “Copilot context” block (errorCode/stage/metadata/causes/fixes) instead of generic status-only errors.

Changes:

  • Introduces a deployment failure pattern catalog and a context builder/formatter for enriched CLI errors.
  • Wraps zip deploy + OneDeploy flows in appservice/custom.py to raise enriched errors for webapps (skipping function apps).
  • Adds unit tests covering pattern matching, context building, formatting, and end-to-end error flow simulation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
src/azure-cli/azure/cli/command_modules/appservice/custom.py Hooks enriched error raising into zipdeploy and OneDeploy error paths.
src/azure-cli/azure/cli/command_modules/appservice/_deployment_failure_patterns.py Defines known failure patterns and matching heuristics.
src/azure-cli/azure/cli/command_modules/appservice/_deployment_context_engine.py Builds YAML “Copilot context” + formatted enriched deployment error message.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_deployment_context_engine.py Unit/integration-style tests for the new pattern/context/error flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Shi1810 Shi1810 changed the title az webapp deploy az webapp up az webapp deployment source config-zip Added enriched deployment failure prompt [App Service] az webapp deploy, az webapp up, az webapp deployment source config-zip - Added enriched deployment failure prompt Mar 9, 2026
@yonzhan yonzhan assigned yanzhudd and unassigned zhoxing-ms Mar 9, 2026
@Shi1810 Shi1810 changed the title [App Service] az webapp deploy, az webapp up, az webapp deployment source config-zip - Added enriched deployment failure prompt [App Service] az webapp deploy, az webapp up - Added enriched deployment failure prompt Apr 2, 2026
@Shi1810 Shi1810 changed the title [App Service] az webapp deploy, az webapp up - Added enriched deployment failure prompt [App Service] az webapp deploy, az webapp up : Added enriched deployment failure logs for quicker resolution Apr 2, 2026
@Shi1810 Shi1810 changed the title [App Service] az webapp deploy, az webapp up : Added enriched deployment failure logs for quicker resolution [App Service] az webapp deploy, az webapp up : Add enriched deployment failure logs for quicker resolution Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants